package com.cq.hd.task.web.job;

import com.cq.hd.product.api.TbActiveApi;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class ActiveTask {

    @Autowired
    private TbActiveApi activeApi;

    // 每隔1h扫描一次 0 0 */1 * * ?
    @XxlJob("scanActive")
    public void execute() {
        log.info("扫描活动是否结束=====>开始");
        activeApi.scanActiveJob();
        log.info("扫描活动是否结束=====>结束");
    }

//    // 扫描核销时间结束的活动
//    @XxlJob("scanAndCloseExpiredActives")
//    public void scanAndCloseExpiredActives() {
//
//    }

}
